home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / Include / ds3100.md / devUart.h < prev    next >
C/C++ Source or Header  |  1989-07-08  |  2KB  |  61 lines

  1. /*
  2.  * devUart.h --
  3.  *
  4.  * Copyright (C) 1989 by Digital Equipment Corporation, Maynard MA
  5.  *
  6.  *            All Rights Reserved
  7.  *
  8.  * Permission to use, copy, modify, and distribute this software and its 
  9.  * documentation for any purpose and without fee is hereby granted, 
  10.  * provided that the above copyright notice appear in all copies and that
  11.  * both that copyright notice and this permission notice appear in 
  12.  * supporting documentation, and that the name of Digital not be
  13.  * used in advertising or publicity pertaining to distribution of the
  14.  * software without specific, written prior permission.  
  15.  *
  16.  * Digitial disclaims all warranties with regard to this software, including
  17.  * all implied warranties of merchantability and fitness.  In no event shall
  18.  * Digital be liable for any special, indirect or consequential damages or
  19.  * any damages whatsoever resulting from loss of use, data or profits,
  20.  * whether in an action of contract, negligence or other tortious action,
  21.  * arising out of or in connection with the use or performance of this
  22.  * software.
  23.  *
  24.  * $Header: devUart.h,v 1.1 89/03/30 18:29:05 mnelson Exp $ SPRITE (DECWRL)
  25.  */
  26.  
  27. #ifndef _DEVUART
  28. #define _DEVUART
  29.  
  30. /*
  31.  * Routines that access the uart refer to either the A channel or B
  32.  * channel.  This typedef allows them to store the type of channel
  33.  * and pass this information to the initialization routine.
  34.  */
  35. typedef enum {
  36.     DEV_UART_CHANNEL_A,
  37.     DEV_UART_CHANNEL_B,
  38. } Dev_UartChannel;
  39.  
  40. /*
  41.  * When a single pointer to the uart structure is treated as a ClientData,
  42.  * it is necessary to have a single structure containing both the
  43.  * address of the device registers and the channel to be used.  This way
  44.  * the caller need only handle a single opaque pointer rather than needing
  45.  * to call a machine-dependent routine with or without information defining
  46.  * the channel.
  47.  */
  48. typedef struct {
  49.     Address uartAddress;
  50.     Dev_UartChannel channel;
  51. } Dev_UartInfo;
  52.  
  53. extern    void     Dev_UartInit();
  54. extern    void     Dev_UartStartTx();
  55.  
  56. #endif _DEVUART
  57.  
  58.  
  59.  
  60.  
  61.